#include<stdio.h>

int main(void)
{
	int n,chengji,input;
	
	while(scanf("%d",&n)!=EOF&&n)
	{
		chengji=1;
		for(int i=0;i<n;i++)
		{
			scanf("%d",&input);
			if(input%2)
			{
				chengji*=input;
			}
		}
		printf("%d\n",chengji);
	}

	return 0;
}
/*

*/

/*

*/

/*

*/

